package com.eastcom.collection.distributor;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement
import javax.xml.bind.annotation.XmlRootElement;

//<?xml version="1.0" encoding="gb2312"?>
//<mappingrule version="1.0">
//
//<module_zone>
//	    <module modid="0x00100000" name="Alarm" cname="告警模块" comment="告警数据处理模块"/>
//	    <module modid="0x10000000" name="Stope" cname="管理平台" comment="业务后台采集综合平台"/>
//	  	<module modid="0x10200000" name="Wap" cname="Wap业务管理" comment="Wap业务管理"/>
//	    <module modid="0x10300000" name="MMS" cname="MMS业务管理" comment="MMS业务管理"/>
//	    <module modid="0x10800000" name="ISMG" cname="ISMG业务管理" comment="ISMG业务管理"/>		
//	    <module modid="0x10b00000" name="SHM" cname="业务健康管理" comment="业务健康管理"/>      
//	    <module modid="0x10f00000" name="CELLID_SUBSYSTEM" cname="位置服务(CELLID)业务子系统" comment="位置服务(CELLID)业务子系统"/>		
//</module_zone>
//
//<target_zone>
//
//
//	<!-- kpi -->
// <target tid="0x10b00001" modid="0x10b00000" name="SQM_KPI_DATA" aidsable="" cname="MMSC_SUBSYSTEM" comment="test"/>
//</target_zone>
//
//<field_zone>   
//	<!-- zhongxin mms MMS_KPICITYDay -->  
//        <field tid="0x10b00151" name="SYSTEM_ID"      seqid="a" comment="" dtid="2"/>
//        <field tid="0x10b00151" name="START_TIME"     seqid="b" comment="" dtid="4"/>
//        <field tid="0x10b00151" name="CITY"           seqid="c" comment="" dtid="2"/>
//        <field tid="0x10b00151" name="iMMSCount"      seqid="d" comment="" dtid="5"/>
//        <field tid="0x10b00151" name="iMMSbusy"       seqid="e" comment="" dtid="5"/>
//        <field tid="0x10b00151" name="iUserCount"     seqid="f" comment="" dtid="5"/>
//        <field tid="0x10b00151" name="iUseUser"       seqid="g" comment="" dtid="5"/>
//        <field tid="0x10b00151" name="iPTCount"       seqid="h" comment="" dtid="5"/>
//        <field tid="0x10b00151" name="iSPTCount"      seqid="i" comment="" dtid="5"/>
//        <field tid="0x10b00151" name="iPTRate"        seqid="j" comment="" dtid="5"/>
//        <field tid="0x10b00151" name="iOCount"        seqid="k" comment="" dtid="5"/>
//        <field tid="0x10b00151" name="iTCount"        seqid="l" comment="" dtid="5"/>
//        <field tid="0x10b00151" name="iNFOCount"      seqid="m" comment="" dtid="5"/>
//        <field tid="0x10b00151" name="iUFOCount"      seqid="n" comment="" dtid="5"/>
//        <field tid="0x10b00151" name="iNFTCount"      seqid="o" comment="" dtid="5"/>
//        <field tid="0x10b00151" name="iUFTCount"      seqid="p" comment="" dtid="5"/>
//        <field tid="0x10b00151" name="iCXNAPct"       seqid="q" comment="" dtid="5"/>
//        <field tid="0x10b00151" name="iCXUAPct"       seqid="r" comment="" dtid="5"/>
//        <field tid="0x10b00151" name="iCXAPct"        seqid="s" comment="" dtid="5"/>`
//     
//</field_zone>
//
//<datatype_zone>
//   <datatype dtid="1" name="Integer" cname="整形数据" exectype="1" comment="1" format="[0-9]"/>
//   <datatype dtid="2" name="String" cname="字符串" exectype="2" comment="2" format="[a-zA-Z0-9 ./:]"/>
//   <datatype dtid="3" name="Ip" cname="IP地址串" exectype="" comment="3" format="[0-9]+\.[0-9]+\.[0-9]+\.[0-9]"/>
//   <datatype dtid="4" name="Datetime" cname="时间型数据" exectype="3" comment="时间型数据" format="[0-9] [0-9]:[0-9]:[0-9]"/>
//   <datatype dtid="5" name="Double" cname="浮点型数据" exectype="1" comment="1" format="[0-9]+\.[0-9]+"/>
//   <datatype dtid="6" name="Long" cname="长整形数据" exectype="1" comment="1" format="[0-9]"/>
//   <datatype dtid="7" name="Short" cname="短整形数据" exectype="1" comment="1" format="[0-9]"/>
//   <datatype dtid="8" name="Float" cname="浮点型数据" exectype="1" comment="1" format="[0-9]"/>
//</datatype_zone>
//
//</mappingrule>
@XmlRootElement(name="mappingrule")
@XmlAccessorType(XmlAccessType.NONE)
public class MappingRule {
	@XmlElement(name = "target_zone")
	TargetZone targetZone
	@XmlElement(name = "field_zone")
	FieldZone fieldZone
	@XmlElement(name = "datatype_zone")
	DatatypeZone dataTypeZone

	public MappingRule() {
		super();
		// TODO 自动生成的构造函数存根
	}	
}

@XmlAccessorType(XmlAccessType.NONE)
public class TargetZone{
	@XmlElement(name = "target")
	List<Target> targetList
	
}
@XmlAccessorType(XmlAccessType.NONE)
public class Target{
	@XmlAttribute(name = "tid")
	String tid
	@XmlAttribute(name = "name")
	String name
}

@XmlAccessorType(XmlAccessType.NONE)
public class FieldZone{
	@XmlElement(name = "field")
	List<Field> feildList
	
}
@XmlAccessorType(XmlAccessType.NONE)
public class Field{
	@XmlAttribute(name = "tid")
	String tid
	@XmlAttribute(name = "name")
	String name
	@XmlAttribute(name = "seqid")
	String seqid
	@XmlAttribute(name = "dtid")
	String dtid
}

@XmlAccessorType(XmlAccessType.NONE)
public class DatatypeZone{
	@XmlElement(name = "datatype")
	List<Datatype> typeList
	
}

@XmlAccessorType(XmlAccessType.NONE)
public class Datatype{
	@XmlAttribute(name = "dtid")
	String dtid
	@XmlAttribute(name = "name")
	String name
	@XmlAttribute(name = "format")
	String format
}

